home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 6: Level 6
/
17 Bit - Level 6 (1998)(Epic Marketing)[!].iso
/
quartz
/
q0428.dms
/
q0428.adf
/
libray
/
libray.diffs
< prev
next >
Wrap
Text File
|
1992-05-20
|
3KB
|
113 lines
diff -d +context /rs4/libray/libtext/checker.c libray/libtext/checker.c
*** /rs4/libray/libtext/checker.c Thu Aug 08 18:58:44 1991
--- libray/libtext/checker.c Tue May 12 18:00:58 1992
***************
*** 49,58 ****
{
int xp, yp, zp;
xp = pos->x > 0. ? pos->x : 1. - pos->x;
yp = pos->y > 0. ? pos->y : 1. - pos->y;
zp = pos->z > 0. ? pos->z : 1. - pos->z;
!
if ((xp + yp + zp) % 2)
*surf = *checker->surf;
/* else surface stays the same. */
--- 49,63 ----
{
int xp, yp, zp;
+ #ifdef MFPU
+ xp = (int)(floor((pos->x > 0.) ? pos->x : 1. - pos->x));
+ yp = (int)(floor((pos->y > 0.) ? pos->y : 1. - pos->y));
+ zp = (int)(floor((pos->z > 0.) ? pos->z : 1. - pos->z));
+ #else
xp = pos->x > 0. ? pos->x : 1. - pos->x;
yp = pos->y > 0. ? pos->y : 1. - pos->y;
zp = pos->z > 0. ? pos->z : 1. - pos->z;
! #endif
if ((xp + yp + zp) % 2)
*surf = *checker->surf;
/* else surface stays the same. */
diff -d +context /rs4/libray/libtext/marble.c libray/libtext/marble.c
*** /rs4/libray/libtext/marble.c Thu Aug 08 18:59:02 1991
--- libray/libtext/marble.c Tue May 12 18:00:44 1992
***************
*** 50,56 ****
--- 50,60 ----
val = Marble(pos);
if (marble->colormap) {
+ #ifdef MFPU
+ index = (int)(floor(255. * val));
+ #else
index = (int)(255. * val);
+ #endif
surf->diff.r *= marble->colormap[index].r;
surf->diff.g *= marble->colormap[index].g;
surf->diff.b *= marble->colormap[index].b;
diff -d +context /rs4/libray/libtext/noise.c libray/libtext/noise.c
*** /rs4/libray/libtext/noise.c Thu Aug 08 19:00:00 1991
--- libray/libtext/noise.c Tue May 12 18:09:58 1992
***************
*** 92,98 ****
--- 92,102 ----
for (i = 0; i < 4096; i++)
hashTable[i] = i;
for (i = 4095; i > 0; i--) {
+ #ifdef MFPU
+ j = (int)(floor(nrand() * 4096));
+ #else
j = (int)(nrand() * 4096);
+ #endif
temp = hashTable[i];
hashTable[i] = hashTable[j];
hashTable[j] = temp;
***************
*** 161,167 ****
--- 165,175 ----
x = point->x - MINX; y = point->y - MINY; z = point->z - MINZ;
/* its equivalent integer lattice point. */
+ #ifdef MFPU
+ ix = (int)floor(x); iy = (int)floor(y); iz = (int)floor(z);
+ #else
ix = (int)x; iy = (int)y; iz = (int)z;
+ #endif
jx = ix+1; jy = iy + 1; jz = iz + 1;
sx = SCURVE(x - ix); sy = SCURVE(y - iy); sz = SCURVE(z - iz);
***************
*** 217,223 ****
--- 225,235 ----
x = point->x - MINX; y = point->y - MINY; z = point->z - MINZ;
/* its equivalent integer lattice point. */
+ #ifdef MFPU
+ ix = (int)floor(x); iy = (int)floor(y); iz = (int)floor(z);
+ #else
ix = (int)x; iy = (int)y; iz = (int)z;
+ #endif
jx = ix+1; jy = iy + 1; jz = iz + 1;
sx = SCURVE(x - ix); sy = SCURVE(y - iy); sz = SCURVE(z - iz);
diff -d +context /rs4/libray/libobj/roots.c libray/libobj/roots.c
*** /rs4/libray/libobj/roots.c Thu Aug 08 18:59:42 1991
--- libray/libobj/roots.c Tue May 12 13:19:45 1992
***************
*** 26,32 ****
--- 26,38 ----
#include "libcommon/common.h"
+ #ifndef AMIGA
+ extern double sqrt(), cbrt(), cos(), acos();
+ #else
+ #ifndef MFPU
extern double sqrt(), cbrt(), cos(), acos();
+ #endif
+ #endif
/* epsilon surrounding for near zero values */